<!DOCTYPE html>
<html>
	<head>
		<title>登录</title>
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=Edge">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta name="format-detection" content="telephone=no" />
		<meta name="description" content="Yan" />
		<meta name="keywords" content="Yan" />
		<meta name="author" content="Yan" />
		<link rel="stylesheet" type="text/css" href="static/css/mui.min.css" />
		<link rel="stylesheet" type="text/css" href="static/css/public.css" />
		<link rel="stylesheet" type="text/css" href="static/css/login.css" />
		<script src="static/js/jquery-2.1.0.js" type="text/javascript" charset="utf-8"></script>
		<script src="static/js/custom.js" type="text/javascript" charset="utf-8"></script>
		<script src="static/js/mui.min.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body style="background: #fff;">
		<div class="login">
		<div class="login-box">
				<h1>员工登录</h1>
			<div class="item">
				<div class="input-row">
					<input type="text" id="recomphone" class="input" placeholder="登记的电话号码">
				</div>
			</div>
			<div class="item">
				<div class="left">
					<div class="input-row">
						<input type="text" id="recomcode" class="input" placeholder="验证码">
					</div>
				</div>
				<div class="right">
					<div class="input-row codebtn ztsbuttom ">
						获取验证码
					</div>
				</div>
			</div>
			
			<div class="item">
				<div class="input-row ztsbuttom loginbtn">
					登录
				</div>
			</div>
		</div>
			<p>©2018 Xi Nan Driving Group. All rights reserved. </p>
		</div>
	</body>

	<script src="static/js/reg.js" type="text/javascript" charset="utf-8"></script>
	<script src="static/js/apiRoot.js" type="text/javascript" charset="utf-8"></script>
	<script src="static/js/api.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		$(function() {
			$(".codebtn").click(function() {
				let recomphone = $("#recomphone").val();
				if (recomphone == "" || recomphone == null || recomphone == undefined || recomphone == "null" || recomphone ==
					"undefined") {
					mui.alert("电话号码不能为空", " ");
					return;
				}
				if (!regList.phone.test(recomphone)) {
					mui.alert("请输入正确的电话号码", " ");
					return;
				}
				sent_msg(recomphone);
			})
			$(".loginbtn").click(function() {
				let recomphone = $("#recomphone").val();
				let recomcode = $("#recomcode").val();
				if (recomphone == "" || recomphone == null || recomphone == undefined || recomphone == "null" || recomphone ==
					"undefined") {
					mui.alert("电话号码不能为空", " ");
					return;
				}
				if (!regList.phone.test(recomphone)) {
					mui.alert("请输入正确的电话号码", " ");
					return;
				}
				let ajaxdata = {
					tel: recomphone,
					code: recomcode,
					openid:getQueryString("openid")
				}
				login(ajaxdata);
			})
		})
	</script>
</html>
